home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / BSP Tree 1.2 / Sources / Core / source / 3d look.cp < prev    next >
Encoding:
Text File  |  1995-02-25  |  2.1 KB  |  58 lines  |  [TEXT/MMCC]

  1. //------------------------------------------------------------------------------
  2. //    File:                    3d look.h
  3. //    Date:                    7/20/94
  4. //    Author:                Bretton Wade
  5. //
  6. //    Description:    this file contains declarations related to 3D look drawing.
  7. //
  8. //------------------------------------------------------------------------------
  9.  
  10. #include    "colors.h"
  11. #include    "3d look.h"
  12.  
  13. //------------------------------------------------------------------------------
  14. //    Frame a rectangle with a raised edge
  15. //------------------------------------------------------------------------------
  16. void    FrameRectUp (Rect &rect)                                                                                                    //    frame a rectangle with a 3d look such that it appears to be projecting up
  17. {                                                                                                                                                                //    begin
  18.     short    right = rect.right - 1,
  19.             left1 = rect.left,
  20.             left2 = rect.left + 1,
  21.             bottom = rect.bottom - 1;
  22.     RGBBackColor (&BLACK);
  23.     RGBForeColor (&LIGHT_GREY);
  24.     MoveTo (rect.left, rect.bottom - 2);
  25.     LineTo (rect.left, rect.top);
  26.     LineTo (rect.right - 2, rect.top);
  27.     RGBBackColor (&WHITE);
  28.     RGBForeColor (&DARK_GREY);
  29.     MoveTo (right, rect.top + 1);
  30.     LineTo (right, bottom);
  31.     LineTo (rect.left + 1, bottom);
  32.     RGBForeColor (&BLACK);
  33. }                                                                                                                                                                //    end
  34.  
  35. //------------------------------------------------------------------------------
  36. //    Frame a rectangle with a lowered edge
  37. //------------------------------------------------------------------------------
  38. void    FrameRectDown (Rect &rect)                                                                                                //    frame a rectangle with a 3d look such that it appears to be projecting up
  39. {                                                                                                                                                                //    begin
  40.     short    right = rect.right - 1,
  41.             left1 = rect.left,
  42.             left2 = rect.left + 1,
  43.             bottom = rect.bottom - 1;
  44.     RGBBackColor (&BLACK);
  45.     RGBForeColor (&LIGHT_GREY);
  46.     MoveTo (right, rect.top + 1);
  47.     LineTo (right, bottom);
  48.     LineTo (rect.left + 1, bottom);
  49.     RGBBackColor (&WHITE);
  50.     RGBForeColor (&DARK_GREY);
  51.     MoveTo (rect.left, rect.bottom - 2);
  52.     LineTo (rect.left, rect.top);
  53.     LineTo (rect.right - 2, rect.top);
  54.     RGBForeColor (&BLACK);
  55. }                                                                                                                                                                //    end
  56.  
  57. //------------------------------------------------------------------------------
  58.